import {Apidepartments,Apisub_departments, Apiroles,} from '@/api'
export default{
    //获取一级科室全部信息
    getCacheDepartments({commit}){
        Apidepartments({allPage:2,is_performance:1}).then((res)=>{
            const data = res.data || []
            commit('setCacheDepartments',data)
        })
    },
    //获取二级科室全部信息
    getCacheSubDepartments({commit}){
        Apisub_departments({allPage:2,is_performance:1}).then((res)=>{
            const data = res.data || []
            commit('setCacheSubDepartments',data)
        })
    },
    //获取角色全部信息
    getCacheRoulsList({commit}){
        Apiroles({allPage:2}).then((res) => {
            const data = res.data || []
            commit('setCacheRoulsList',data)
        })
    }
}